<?php
$cs = Yii::app()->getClientScript();
$cs->registerCSSFile(Yii::app()->request->baseUrl . '/css/mobile/booking_find_1.css');
?>
<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="full-screen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
 <style>
    #clear-history {
        margin-top: .2rem;
    }

    .search-wrapper {
        //min-height: 5rem;
    }

    #search-form {
        margin-top: .2rem;
        margin-bottom: .2rem;
        //height: .8rem;
        position: relative;
    }

    .nav-bar {
        border-top: 1px solid #ccc;
        margin-top: .2rem;;
        display: none;
    }

    .box-search {
        vertical-align: middle;
        position: relative;
		margin-bottom:5px;
       // margin-right: 1.4rem;
        border-radius: .06rem;
        border: 1px #CCC solid;
        background: #FFF;
        height: .8rem;
        line-height: .8rem;
        padding: 0 .7rem 0 .7rem;
        -webkit-box-sizing: border-box;
    }

    .box-search.active {
        border-color: #2bb2a3;
    }

    #search-form button {
        position: absolute;
        right: 0;
        top: 0;
        width: 1.2rem;
        height: 100%;
        -webkit-box-sizing: border-box;
    }

    #search-form input[type='text'] {
        width: 100%;
        border: none;
        background: rgba(255, 255, 255, 0);
        outline-style: none;
        display: block;
        line-height: .28rem;
        height: 100%;
        font-size: .28rem;
        padding: 0;
    }

    #search-form .icon-search {
        position: absolute;
        left: .2rem;
        font-size: .4rem;
        color: #999;
    }

    .box-search .delete-button {
        position: absolute;
        width: .4rem;
        height: .4rem;
        border-radius: .4rem;
        background-color: #CCC;
        right: .2rem;
        top: .2rem;
        text-align: center;
        line-height: .4rem;
        color: white;
    }

    .search-suggestion {
        border-top: 1px solid #ccc;
    }

    .search-suggestion .list-item {
        background-color: #FDFDFC;
        border-bottom: 1px solid #ccc;
    }

    .search-suggestion .list-item>a {
        padding: .3rem .4rem;
    }

    .search-suggestion .list-item .result-count {
        float: right;
        color: #999;
    }
</style>
<script type="text/javascript">
$(document).ready(function() {
    $("#fastSearch").click(function() {
        $("#fastSearch_input").attr("checked", "checked");
        $("form[name=search_form]").submit();
    });
    $("#search").click(function() {
        $("#search_input").attr("checked", "checked");
        $("form[name=search_form]").submit();
    });
});
</script>
    <header class="navbar">
                <div class="nav-wrap-left">
                    <!--<a class="react back" href="#"><i class="text-icon icon-back"></i></a>-->
                </div>
            <h1 class="nav-header">搜索</h1>

        <?php
        $screen = Blyn::app()->getUIManager()->getCurrentScreen();
        $wxControl = $screen->getChildControl('BUIWXControl_1');
        $wxControl->renderView('booking_navigation', array());
        
        $model = new BDynamicFormModel();
        $model->addField('findText');
        ?>
        <?php $searchUrl = $wxControl->getLinkUrl(array('name' => 'search', 'id' => 'search')); ?>
        </header>

<div id="tips"></div>

<div class="search-wrapper">
    <div class="wrapper">
        <!--<form id="search-form"  method="post">-->
        <?php echo CHtml::beginForm($searchUrl, 'post', array('name' => 'search_form','id'=>'search-form')) ?>
            <div class="box-search" style="background:#fff url(<?php echo Yii::app()->request->baseUrl . '/images/mobile/search.png';?>) no-repeat">
               
                <?php echo CHtml::activeTextField($model, 'findText', array('id'=>'keyword','class' => '','placeholder'=>'请输入场地名称、场馆名称等','autocomplete'=>'off')); ?>
                <!--<input id="keyword" type="text" name="w" placeholder="请输入场地名称、场馆名称等" autocomplete="off" value="">-->
            </div>
        <input type="radio" name="BDynamicFormModel[findType]" id="fastSearch_input" value="" style="display: none;" checked="checked"/>
            <input type="radio" name="BDynamicFormModel[findType]" id="search_input" value="full" style="display: none;"/>
            <!--<button type="submit" class="btn">搜索
            </button>-->
<div>
<!--            <ul class="box nopadding ">
               <div class="hot-link react" style="display: -webkit-inline-box;margin: 10px;">选择区域</div>
              <select>
            <option value="china.chongqing.banan">巴南区</option>
            <option value="china.chongqing.yuzhong">渝中区</option>
            <option value="china.chongqing.shapingba">沙坪坝</option>
          </select>
            </ul>-->
        </div>
        <!--</form>-->
        <?php echo CHtml::endForm() ?>
    </div>
</div>
<footer style="padding-top:0px;">
<div class="footer-bar">
    <div class="pull-right">
        <a id="search" class="btn btn-weak footer-citybtn" style="width:initial">更新并查找</a>
    </div>
        <a id="fastSearch" class="btn btn-weak">快速查找</a>
</div>
        <div class="footer-copyright">
            <div class="hr"></div>
            <span class="footer-copyright-text">
			Copyright © 2014 billyn.net </span>
        </div>
    </footer>
 </body></html>